package com.example.fresheveryday.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.fresheveryday.po.Suborder;
import com.example.fresheveryday.service.SuborderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ll
 * @since 2023-07-5
 */
@RestController
@RequestMapping("/suborder")
public class SuborderController {
    @Autowired
    SuborderService suborderService;
    @RequestMapping("/detail")//查看订单详情
    public Suborder getDetail(String id){
        QueryWrapper<Suborder> wrapper = new QueryWrapper<>();
        wrapper.eq("orderid",id);
        return suborderService.getOne(wrapper);
    }

}
